import random

def shuffle(alist):
    random.shuffle(alist)
    print(alist)
    
#排好序的列表
alist=[x for x in range(1,6)]
shuffle(alist)

# 实现的很好，简洁明了